<include file="public@header" />
</head>
<body>
	<div class="wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a >列表</a></li>
			<li><a href="{:url('Vipuser/add')}">添加</a></li>
		</ul>
        
        <form class="well form-inline margin-top-20" method="post" action="{:url('Vipuser/index')}">
            用户ID：
            <input class="form-control" type="text" name="uid" style="width: 200px;" value="{:input('request.uid')}"
                   placeholder="用户ID">
            <input type="submit" class="btn btn-primary" value="搜索"/>
            <a class="btn btn-danger" href="{:url('Vipuser/index')}">清空</a>
        </form>
        
		<form method="post" class="js-ajax-form">
			<table class="table table-hover table-bordered">
				<thead>
					<tr>
						<th>用户</th>
						<th>更新时间</th>
                        <th>到期时间</th>
                        <th>是否有效</th>
						<th align="center">{:lang('ACTIONS')}</th>
					</tr>
				</thead>
				<tbody>
					<foreach name="list" item="vo">
					<tr>
						<td>{$vo['userinfo']['user_nickname']} ({$vo['userinfo']['id']})</td>
                        <td>{:date('Y-m-d H:i',$vo['addtime'])}</td>
                        <td>{:date('Y-m-d H:i',$vo['endtime'])}</td>
                        <td>
                            <if condition="$vo['endtime'] gt time()">
                            是
                            <else/>
                            否
                            </if>
                        </td>
						<td>	
                            <a class="btn btn-xs btn-primary" href='{:url("Vipuser/edit",array("id"=>$vo["uid"]))}'>{:lang('EDIT')}</a>
							<a class="btn btn-xs btn-danger js-ajax-delete" href="{:url('Vipuser/del',array('id'=>$vo['uid']))}">{:lang('DELETE')}</a>
						</td>
					</tr>
					</foreach>
				</tbody>
			</table>
			<div class="pagination">{$page}</div>

		</form>
	</div>
	<script src="__STATIC__/js/admin.js"></script>
</body>
</html>